package com.aplink.demoselltool.activities;

import com.aplink.demoselltool.R;
import com.aplink.generic.GenericActivity;
import com.aplink.generic.sharepreference.GenericSharePreference;

public class AccessCodeActivity extends GenericActivity {
	private boolean isOfflineMode;
	
	@Override
	protected int initFormDesign() {
		return R.raw.formdesign_activity_access_code;
	}
	
	@Override
	protected int initContentData() {
		return R.raw.contentdata_activity_access_code;
	}
	
	@Override
	protected void beforeCreateFragment() {
		isOfflineMode = GenericSharePreference.getInstance().isOfflineMode();
		GenericSharePreference.getInstance().setOfflineMode(false);
	}
	
	@Override
	protected void onPause() {
		GenericSharePreference.getInstance().setOfflineMode(isOfflineMode);
		super.onPause();
	}
}
